package com.margiel.rozkladowka;

import java.io.InputStream;
import java.util.Scanner;

public class Cleaner {
	public static String clean(InputStream inputStream){
		Scanner scanner = new Scanner(inputStream);
		scanner.useDelimiter("(</|<).+(>|/>)");
		StringBuffer sb = new StringBuffer();
		while(scanner.hasNext()){
			String next = scanner.next().trim();
			if (!next.equals("")){
				sb.append(next);
			}
		}
		return sb.toString();
	}
	
	

}
